package com.meta.act.app.domain.system;

import com.meta.act.entity.SysRole;

import java.util.List;

/**
 * java类简单作用描述
 *
 * @Title:
 * @Package: com.meta.act.app.domain.system.
 * @Author: M.simple
 * @Remark: The modified content
 * @CreateDate: 2020/11/25 5:53 下午
 * @Version: v2.0
 */
public class SysRoleDo extends SysRole {

	public static SysRoleDo ofAdminRole(Long tenantId, Long deptId, List<Long> menuIds){

		SysRoleDo sysRoleDo = new SysRoleDo();
		sysRoleDo.setRoleName("超级管理员");
		sysRoleDo.setRoleKey("admin");
		sysRoleDo.setTenantId(tenantId);
		sysRoleDo.setRoleSort("0");
		sysRoleDo.setStatus("0");

		Long[] deptIds = new Long[1];
		deptIds[0] =  deptId;
		sysRoleDo.setDeptIds(deptIds);

		sysRoleDo.setMenuIds(menuIds.toArray(new Long[menuIds.size()]));

		return sysRoleDo;
	}
}
